/*
 * GET home page.
 */
exports.index = function (req, res) {
    /*
    var crypto = require('crypto'),
        User = require('../models/user.js');

    var newUser = new User({
        name: 'wql1',
        password: 'pass',
        email: 'wql@126.com'
    });
    User.get(newUser.name, function(err, user){
        if(user){
            console.log(user);
            err = '用户已存在!';
        }
        if(err){
            console.log(err);
            return;
        }
        newUser.save(function(err){
            if(err){
                console.log(err);
                return;
            }
            req.session.user = newUser;
            req.flash('success','注册成功!');
            console.log('reg_success');
        });
    });
*/
    res.render('index', { title: 'Express' });
};